package com.mls.fivedistrict.server;

import com.baomidou.mybatisplus.mapper.Wrapper;
import com.mls.fivedistrict.entity.request.CreateOrderRequest;
import com.mls.fivedistrict.entity.request.PayOrderRequest;
import com.mls.fivedistrict.entity.response.CreateOrderResponse;
import com.mls.fivedistrict.pojo.GoodsOrder;
import com.baomidou.mybatisplus.service.IService;


import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author Five Team
 * @since 2018-05-15
 */
public interface GoodsOrderService extends IService<GoodsOrder> {

    /**
     * 创建订单
     *
     * @param createOrderRequest
     * @return
     */
    CreateOrderResponse createOrder(CreateOrderRequest createOrderRequest);


    /**
     * 订单支付
     *
     * @param payOrderRequest
     * @return
     */
    boolean payOrder(PayOrderRequest payOrderRequest);

    void cancelOrder(Long goodsOrderId, Long useId);

    void autoCloseOrder();
}
